home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / info / drdtips.zip / 1301.TXT < prev    next >
Text File  |  1991-12-31  |  5KB  |  121 lines

  1. Document 1301
  2. Basic Memory Optimization
  3.  
  4. Description:
  5.  
  6.  System Memory Optimization
  7.  
  8. Because the DR DOS 6.0 operating system has been designed to
  9. work with all IBM-compatible personal computers and software
  10. applications, there is no single perfect memory setup that will
  11. optimize memory use for all situations. Memory optimization will
  12. depend both on your particular hardware setup and the software
  13. applications you will be using. However, with a bit of
  14. trial-and-error system fine tuning, you can optimize DR DOS
  15. memory management to meet your particular needs. Below are
  16. techniques and suggestions that will help you optimize your
  17. computer/software setup.
  18.  
  19. Changing Order of Memory Allocation
  20.  
  21. The first step in optimizing your system memory can be as simple
  22. as rearranging the order in which memory blocks are assigned by
  23. the config.sys and autoexec.bat files.  The general rule here is
  24. to use upper memory and high memory as much as possible to free
  25. conventional memory for your applications. With this in mind,
  26. you should typically use HIBUFFERS and relocate the DR DOS
  27. kernel code to high memory by using the /BDOS=FFFF option of the
  28. DR DOS memory management drivers, HIDOS.SYS and EMM386.SYS.
  29. Also, if you have any add-on cards that use RAM, make sure that
  30. they are configured so that their RAM is allocated from the
  31. beginning or end of upper memory.  For example, place a network
  32. card immediately above the video RAM area instead of in the
  33. middle of upper memory.
  34.  
  35. Following this, device drivers and TSRs can be loaded into upper
  36. memory. For best memory allocation, those drivers and TSRs that
  37. occupy the largest blocks of memory should be loaded first and
  38. contiguously. For example, if you need to load three device
  39. drivers and two TSR programs, order them in descending order in
  40. your config.sys file, beginning with the driver that will occupy
  41. the most RAM, to the driver or TSR that will occupy the least
  42. RAM. The documentation for the drivers and TSRs should indicate
  43. the amount of RAM they require; however, if they do not, you can
  44. determine this yourself by using the following procedure:
  45.  
  46. 1. Load the driver or TSR.
  47.  
  48. 2. Use the MEM /U or /B command to see a report of your memory
  49. usage (see Chapter 10 of the DR DOS 6.0 User Guide for a full
  50. description of the MEM command and Chapter 12 regarding loading
  51. device drivers and TSRs).
  52.  
  53. Expanding Files
  54.  
  55. If, after determining the size of your drivers and TSRs and
  56. loading them into high memory, a driver or program fails to run
  57. properly or produces an out of memory error message, the problem
  58. might be that the driver or program is expanding itself in RAM.  
  59.  
  60. Some device drivers and TSR programs occupy a minimal amount of
  61. RAM after they are loaded into memory, but, while initializing,
  62. might actually expand and take up considerably more RAM than
  63. they will ultimately need. Another method of verifying the
  64. program's true RAM size is to load it into conventional memory
  65. (i.e., by deactivating the HIDEVICE, HIINSTALL, or HILOAD
  66. commands), activate the program, and then run the MEM /B command
  67. to see the actual amount of RAM the program occupies. If the
  68. program or driver is expanding itself in RAM, and you want to
  69. load it into upper memory, you will have to allow sufficient
  70. upper memory RAM to accommodate the initialization size of the
  71. program. It might be necessary to use trial-and-error to
  72. determine this size.  See also "Using MemoryMAX with NetWare" on
  73. page 33 for an example.
  74.  
  75. Example 
  76.  
  77. In the following example, let's assume you want to load Device
  78. Drivers 1, 2, and 3, and TSR programs 1 and 2, each requiring
  79. the following amounts of memory:
  80.  
  81. Driver #1       =  13Kbyte of RAM
  82. Driver #2       =  10Kbyte of RAM 
  83. Driver #3       =  16Kbyte of RAM 
  84. TSR #1  =  4Kbyte of RAM 
  85. TSR #2  =  6Kbyte of RAM
  86.  
  87. Using the MemoryMAX HIDEVICE and/or HIINSTALL commands, enter
  88. these  lines into your config.sys file:
  89.  
  90. HIDEVICE = C:\DRIVER#3.SYS      ; which uses 16kb RAM 
  91. HIDEVICE = C:\DRIVER#1.SYS      ; which uses 13kb RAM 
  92. HIDEVICE = C:\DRIVER#2.SYS      ; which uses 10kb RAM 
  93. HIINSTALL = TSR#2               ; which uses 6kb RAM 
  94. HIINSTALL = TSR#1               ; which uses 4kb RAM
  95.  
  96. Note:
  97. There can be exceptions to loading TSRs and drivers in the
  98. "largest first" system described previously. Some device drivers
  99. must be loaded in a specific order. Read the manufacturer's
  100. documentation carefully before installing any driver.
  101.  
  102. Note that in the above example, you can load the two TSRs with
  103. the HILOAD command placed in the autoexec.bat file. For a
  104. discussion of the MemoryMAX HIINSTALL, HIDEVICE, and HILOAD
  105. commands, see "MemoryMAX System Commands and Drivers" on page 4
  106. in the DR DOS 6.0 User Guide.
  107.  
  108. LIM Page Frame
  109.  
  110. Some applications run better with the availability of LIM memory
  111. (sometimes called EMS, or expanded memory). The documentation
  112. for each of your applications will indicate if LIM memory is
  113. required.
  114.  
  115. If the application does not require LIM memory, be sure that no
  116. LIM page frame is defined. This will save 64 Kbytes of upper
  117. memory. In the EMM386.SYS line of your config.sys file, disable
  118. the page frame with the switch /F=NONE. If using HIDOS.SYS on a
  119. machine with a LIM 4.0 memory card, you can disable the page
  120. frame by specifying /CHIPSET=EMSALL.
  121.